<?php

namespace App\B2BProject\Custom\Business;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;

class Address extends Model
{
    protected $guarded = ['created_at', 'updated_at'];

    /**
     * @param Builder $builder
     * @return mixed
     */
    public function scopeAvailableMember(Builder $builder)
    {
        return $builder->where('member_id', \Auth::user()->id);
    }
}
